Skip to content

[fix/MAT-617] 관리자 계정 생성 및 관리 적용#314

Draft
anjm1020 wants to merge 2 commits intodevelopfrom
fix/MAT-617-admin-user-ui
Draft

[fix/MAT-617] 관리자 계정 생성 및 관리 적용#314
anjm1020 wants to merge 2 commits intodevelopfrom
fix/MAT-617-admin-user-ui

Conversation

@anjm1020
Copy link
Copy Markdown
Contributor

@anjm1020 anjm1020 commented May 6, 2026

Summary

관리자 계정 관리 화면과 관련 API controller를 apps/admin에 추가했습니다.
관리자 계정 목록 조회, 생성, 수정, 삭제 흐름을 admin UI에서 처리할 수 있도록 연결했습니다.
메뉴 항목이 늘어나면서 사이드바 하단이 잘리던 문제도 함께 수정해, 메뉴 영역만 스크롤되도록 정리했습니다.

MAT-429 권한분리 FE 대응도 같은 PR에 포함했습니다.
로그인/토큰 갱신 응답의 관리자 권한 정보를 세션으로 저장하고, GNB 노출과 직접 URL 접근을 동일한 권한 매핑으로 제어합니다.
MAT-617의 관리자 계정 관리 화면은 유지하되 /setting/admins로 이동했고, 기존 /admin-user는 새 설정 경로로 redirect합니다.

Linear

Changes

  • 관리자 계정 목록/상세 조회, 수정, 삭제용 OpenAPI schema 및 user controller 추가
  • 관리자 계정 관리 route를 /setting/admins로 구성하고 생성/수정/삭제 UI 구현
  • 기존 /admin-user 접근 시 /setting/admins로 redirect
  • GNB에 관리자 계정 메뉴를 추가하고 사이드바 메뉴 영역 overflow를 스크롤 가능하도록 수정
  • 최신 OpenAPI schema 반영 및 menu, role controller 추가
  • 로그인/refresh 응답의 adminType, roleId, roleName, accessibleMenus를 admin session으로 저장
  • GNB 메뉴 노출과 직접 URL 접근을 accessibleMenus 기반으로 제어
  • 권한 없는 URL 접근 시 접근 가능한 첫 메뉴로 redirect하고, 접근 가능 메뉴가 없으면 세션 정리 후 로그인으로 이동
  • /setting/roles 역할 관리 화면 추가
  • 관리자 계정 목록에서 역할 할당 UI 추가
    • 슈퍼 관리자 선택 시 roleId: null 전송
    • 역할 선택 시 PATCH /api/admin/user/{id}/role 호출

Testing

  • pnpm --filter admin typecheck
  • pnpm --filter admin lint
  • pnpm --filter @repo/pointer-editor-v2 build
  • pnpm --filter admin build
  • 관리자 계정 화면 코드 기준 생성/수정/삭제 및 에러 처리 흐름 점검
  • 권한별 GNB/redirect 동작은 실제 백엔드 권한 응답으로 추가 수동 확인 필요

Risk / Impact

  • 영향 범위: apps/admin의 관리자 계정 관리 화면, GNB 메뉴, auth session 저장/삭제, route guard, user/menu/role API wrapper
  • 확인이 필요한 부분: 실제 백엔드 응답/에러 코드가 OpenAPI schema 및 화면 처리와 일치하는지
  • 배포 시 유의사항:
    • /api/admin/user, /api/admin/user/{id}, /api/admin/user/{id}/role 스펙이 현재 schema와 동일해야 함
    • 로그인/refresh 응답에 adminType, roleId, roleName, accessibleMenus가 포함되어야 함
    • 메뉴 name은 seed 영문 코드와 일치해야 함

Screenshots / Video

  • 없음

@linear
Copy link
Copy Markdown

linear Bot commented May 6, 2026

@vercel
Copy link
Copy Markdown

vercel Bot commented May 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pointer-admin Ready Ready Preview, Comment May 6, 2026 10:56am

@anjm1020 anjm1020 requested a review from sterdsterd May 6, 2026 10:57
@anjm1020 anjm1020 added the ✨ Feature 기능 개발 label May 6, 2026
@anjm1020 anjm1020 removed the ✨ Feature 기능 개발 label May 6, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 38bb2eb628

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

};
/** 관리자 계정 단건 조회 */
get: operations['getUserById'];
put?: never;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove conflicting put type in admin user detail path

The new OpenAPI path type declares put twice for /api/admin/user/{id} (put?: never here and put: operations['putUser'] later), which makes the declaration internally contradictory. This can break strict type-checking/tooling (for example when skipLibCheck is off) and makes method inference for this endpoint unreliable; keep only the concrete put operation declaration.

Useful? React with 👍 / 👎.

@anjm1020 anjm1020 marked this pull request as draft May 7, 2026 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants